home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / atari / birkhahn-metafont-packed-disks / mf27-2_2e-disk2.zoo / inputs / pandora.lzs / PNSTT9.ORI < prev    next >
Text File  |  1991-11-26  |  12KB  |  200 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % pnsltt9.mf Pandora Single Pitch slanted 15 characters per inch fits with 9pt
  7.  
  8. mode_setup;                             % general setup
  9. input pandor                            % general definitions used in pandora
  10.  
  11. designsize:= 9pt#;                      % intended "ideal" size for parameters
  12. width#:=     9pt#;                      % width of an em
  13. maxheight#:= 7.75pt#  *.85;             % max height for delimiters,e.g., [,{,(
  14. ascender#:=  7.5pt#   *.85;             % height of ascenders, e.g., on l,h,k
  15. cap#:=       7pt#     *.85;             % height of uppercase, e.g., B,H,L
  16. xheight#:=   5pt#     *.85;             % xheight of lowercase, e.g., x,n,o
  17. descender#:= 2pt#     *.85;             % depth of descenders, e.g., on j,p,q
  18. maxdepth#:=  2.25pt#  *.85;             % max depth for delimiters,e.g., [,{,(
  19. math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math 
  20.  
  21. accent_height#:=.3(ascender#-xheight#); % places bottom of accents 
  22. accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth
  23.  
  24. define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender,
  25.   maxdepth,math_axis,accent_depth);
  26.  
  27. fixed_pitch_characters(true)(15);       % true/false, # of characters per inch
  28. oblique:=10;                            % slant of character reference points
  29.  
  30. bowlstem.uc#:=.9      *fixed_pt;        % uppercase (uc) bowl width
  31. bowlstem.lc#:=.9      *fixed_pt;        % lowercase (lc) bowl width
  32. stem.uc#:=.9          *fixed_pt;        % uppercase stem width
  33. stem.lc#:=.9          *fixed_pt;        % lowercase stem width
  34. thin_stem.uc#:=.6     *fixed_pt;        % width of thin uppercase stems
  35. thin_stem.lc#:=.6     *fixed_pt;        % width of thin lowercase stems
  36. define_pixels
  37.   (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc);
  38.  
  39. boldness:=1;
  40. makeknown(fitbasis.lc#)(.21*width#);
  41. makeknown(fitbasis.uc#)(.30*width#);
  42.  
  43. apex.uc:=inlimit(.9stem.uc)(0,stem.uc); % apex flatness in uppercase
  44. apex.lc:=inlimit(.9stem.lc)(0,stem.lc); % apex flatness in lowercase
  45. ov_t.uc:=.01cap;                        % top curve overshoot for uppercase
  46. ov_t.lc:=.01xheight;                    % top curve overshoot for lowercase
  47. ov_b.uc:=.01cap;                        % bottom curve overshoot for uppercase
  48. ov_b.lc:=.01xheight;                    % bottom curve overshoot for lowercase
  49. ov_apex.uc:=0;                          % apex overshoot for uppercase
  50. ov_apex.lc:=0;                          % apex overshoot for lowercase   
  51. apex_angle:=oblique;                    % for changing the angle at apex 
  52. if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi
  53. if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi
  54.  
  55.                                         % for SERIFS and ARMS
  56. serif_thickness:=inlimit(0)(eps,.5xheight); % base thickness of horz serifs
  57. terminal_thickness:=serif_thickness;    % base thickness of terminal serifs
  58. tip_thickness:=     serif_thickness;    % base thickness of arms
  59. bulb_thickness:=   .5stem.lc;           % (base) thickness of bulbs
  60. x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join
  61. cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap);       % uc bracket join
  62. bool(ctrls):=false;                     % for explicit placement of control pts
  63. onbase:=inlimit(0)(0,1);                % places control pt along base of serif
  64. onstem:=inlimit(0)(0,1);                % places control pt along stem of serif
  65. midbracket_pull:=    inlimit(.6)(0,1);  % pulls brackets in on arms and serifs
  66. entasis:=            inlimit(0)(0,1);   % amount of arc in horizontal serif base
  67. terminal_entasis:=   inlimit(0)(0,1);   % amount of arc in terminal serif base
  68. arm_angle:=          inlimit(10)(0,60); % global angle off of 90 degrees
  69. asc_terminal_angle:= inlimit(0)(0,60);  % at ascender height: from 0 deg...h,k,l
  70. x_terminal_angle:=   inlimit(0)(0,60);  % at x-height: from 0 deg...m,n,r
  71. base_terminal_angle:=inlimit(0)(0,60);  % at base line: from 0 deg...u
  72. diag_terminal_angle:=inlimit(0)(0,60);  % on diagonals: from 0 deg...k,v,w,y
  73. hs:=0;                                  % global horizontal serif length
  74. ts:=0;                                  % global terminal serif length
  75. as:=0;                                  % global arm length
  76. cs:=.5pt;                               % global curvedarm length
  77. serif_constant_amt:=0pt;                % adds same length amount to all serifs
  78. bool(bulbs):=false;                     % arms become bulbs if true
  79. bool(bulb_taper):=true;                 % changes bulbs to tapering shape
  80. taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end
  81. bulb_taper_amt:=0;                      % taper length as a % of limb thickness
  82. c_and_s.lc:=.65stem.lc;                 % c,s bulb length if bulb_taper=true
  83. c_and_s.uc:=.85stem.uc;                 % C,G,S bulb length if bulb_taper=true
  84. terminal_softness:=0;                   % softness in heel of the terminal serif
  85. arm_softness:=0;                        % softness in the heel of the arm
  86.  
  87.                                         % ARCHES
  88. arch_thickness.uc:=thin_stem.uc;        % uppercase arch thickness
  89. arch_thickness.lc:=thin_stem.lc;        % lowercase arch thickness
  90. arch_tip.uc:=arch_thickness.uc;         % thinnest part of the uc arch
  91. arch_tip.lc:=arch_thickness.lc;         % thinnest part of the lc arch
  92. arch_reference:=inlimit(.65)(.4,.95);   % puts ref pts between tip/stem
  93. arch_inner_amt:=inlimit(.8)(.4,.95);    % puts arch pts between tip/ref pts
  94. r_arch:=l_arch:=inlimit(.6)(0,1);       % y-value of max outer stress on r_arch
  95. bool(ensure_min_archthickness):=true;   % guarantees minimum thickness
  96.  
  97.                                         % BOWLS
  98. major_curve.uc:=arch_thickness.uc;      % uppercase major bowl curve thickness
  99. major_curve.lc:=arch_thickness.lc;      % lowercase major bowl curve thickness
  100. minor_curve.uc:=.9arch_thickness.uc;    % uppercase minor bowl curve thickness
  101. minor_curve.lc:=.9arch_thickness.lc;    % lowercase minor bowl curve thickness
  102. major_bowl_tip.lc:=major_curve.lc;      % lowercase major bowl tip thickness
  103. minor_bowl_tip.lc:=minor_curve.lc;      % lowercase minor bowl tip thickness
  104. major_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem
  105. minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem
  106. major_bowl_inner_amt:=inlimit(.9)(.4,.95); % puts arch pts between tip/ref pts 
  107. minor_bowl_inner_amt:=inlimit(.9)(.4,.95); % puts arch pts between tip/ref pts
  108.  
  109. define_minimums(                        % these values keep a one pixel minimum
  110.   bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc,
  111.   bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc,
  112.   major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc,
  113.   major_curve.uc,minor_curve.uc);
  114.  
  115.                                         % ARCHES and BOWLS and CIRCULAR SHAPES
  116. v_stress:=.52;                          % places point of vert stress on bowl
  117. h_stress:=.53;                          % places horzstress on circular shapes
  118. ductal:=inlimit(.15)(0,1);              % for more ductal strokes: value of 1
  119. minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join
  120. circ1:=inlimit(.9)(.75,1.5);            % tension of outer curve shapes
  121. circ2:=inlimit(.9)(.75,1.5);            % tension of inner curve shapes
  122. circ3:=inlimit(.9)(.75,1.5);            % tension of outer circular_shapes
  123.                          
  124.                                         % JUNCTURES and NOTCHES
  125. bool(softjuncture):=false;              % are junctures soft? in junct macro
  126. juncture_opening:=inlimit(0)(0,stem.lc);% indent into stem at juncture
  127. stemcut_angle:=0;                       % cut into stem at angle off of 90
  128. archcut_angle:=0;                       % cuts into regular arch path
  129. notch_length.uc:=.05stem.uc;            % length of corrective notching (uc)
  130. notch_length.lc:=.05stem.lc;            % length of corrective notching (lc)
  131. notch_width:=1;                         % width of corrective notching in pixels
  132. notch_pos:=.3;                          % positions the beginning of the notch
  133. bool(center_notch):=                    % centers all notches
  134.  if(thin_stem.lc/stem.lc)>=.75:true else:false fi;
  135. bool(nonotch):=if(xheight<15)           % if real low resolution
  136.  or(xheight#>15pt#)                     % or large character size
  137.  or(thin_stem.uc/stem.uc<.5):true       % or small thin/thick ratio
  138.  else:false fi;                         %   this overrides notching
  139.  
  140.                                         % PUNCTUATION, ACCENTS, MATH and PENS
  141. round_dot_diameter:=1.1stem.uc;         % diameter of dots on ;:    
  142. accent_dot_diameter:=stem.lc;           % diameter of dots(!?") and dot accents
  143. comma_dot_indent=inlimit(.25)(0,1);     % indent in the comma macro for the dot 
  144. bool(prime):=false;                     % changes comma to prime 
  145. prime_angle:=-20;                       % angle of prime-like comma
  146. bool(realsoft_accents):=false;          % make accents soft as possible
  147. accent_thin_end:=max(1,.6thin_stem.lc); % thinnest end of accents
  148. accent_thick_end:=max(1,.6stem.lc);     % thickest end of accents
  149. mathlines:=max(1,.45pt);                % thickness of lines in math characters
  150. head_thickness:=max(1,.9mathlines);     % arrowhead thickness
  151. def mathpen=pensquare scaled mathlines enddef;              % for []/=+#%-\<>_|^
  152. blank_space_thickness:=max(1,.7mathlines);                  % for space char
  153. def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars
  154. def dashpen=pensquare scaled max(1,.75mathlines) enddef;    % for en em
  155.  
  156.                                         % MISCELLANEOUS
  157. join_radius:=.1pt;                      % global softness for use with softjoin
  158. bool(softpath):=true;                   % softens paths in macros
  159. narrow_amt:=inlimit(.7)(0,1);           % thins strokes if narrow condition=true
  160. w_narrow_amt:=inlimit(.3)(0,1);         % thins strokes especially for eMwW oe
  161. ebar_angle:=0;                          % used on the lowercase e
  162. bool(bold):=false;                      % changes accent shapes if bold
  163.  
  164. rulepen:=pensquare scaled 1;            % makes screenrules 1 pixel thick
  165. if oblique=0:let //=relax               % lets // do nothing if needed otherwise
  166.   else:def //=slanted(sind oblique/cosd oblique) enddef fi; % // slants ref pts
  167. pair upward,downward; 
  168.  upward=dir(90-oblique);                % "up" along oblique angle
  169.  downward=dir(-90-oblique);             % "down" along oblique angle
  170.  
  171.                                         % ALTERNATE character specs
  172. bool(test_all_characters):=false;       % allows testing of alternate characters
  173.  alt0:=0; bool(a_full_bowl):=false;     % for half/double bowls on a
  174.  alt1:=0; bool(g_full_bowl):=true;      % for half/double bowls on g
  175.  alt2:=0; bool(spur):=true;             % for pronged terminals on G,a,b,g,q
  176.  alt3:=0; bool(like_lowercase):=false;  % alternate U
  177.  alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X
  178.  alt5:=0; bool(beveled_join):=false;    % on R,K,k
  179.  alt6:=0; bool(open_tail):=false;       % for 3,5,6,9
  180.  alt7:=0; bool(diagonal_three):=false;  % for diagonal as opposed to round top 3
  181.  alt8:=0; bool(inflection_two):=false;  % for 2 with inflection
  182.  alt9:=0; bool(G_spur):=false;          % spur on G
  183.  alt10:=0;bool(open_four):=true;        % for top of 4 
  184.  
  185. extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];";
  186. extra_beginchar:=extra_beginchar&"w#:=charwd;";          % for adjust def
  187. extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;";       % for adjust def
  188.  
  189. for x:="a":
  190.  wanted[byte x]:=true; endfor           % test these characters
  191. let iff=always_iff;                     % tests all chars in the file
  192.   let show_character=draw_outlines; 
  193. % changed by Lutz Birkhahn, 26 Nov 1991, was:
  194. % if (mode=imagen)or(mode=aps):let show_character=fill_all;fi
  195.   if mode<>proof:let show_character=fill_all;fi
  196.  
  197. input tttext                            % Typewriter Text character set
  198.  
  199.  
  200.